// Simple Compare string
// By DreamVB 19:38 06/10/2016 

#include <iostream>

using namespace std;
using std::cout;
using std::endl;

bool StrComp(string s0, string s1){
	int len0 = s0.length();
	int len1 = s1.length();
	bool IsSame = true;
	int i = 0;

	//Check lengths
	if (len0 != len1){
		return false;
	}

	//Check each char in both strings.
	while (i < len0){
		if (s0[i] != s1[i]){
			IsSame = false;
			break;
		}
		i++;
	}
	return IsSame;
}


int main(int argc, char *argv[]){
	//Check if two strings are the same.
	cout << "Ben =  BEN " << StrComp("Ben", "BEN") << endl;
	cout << "Ben =  Ben " << StrComp("Ben", "Ben") << endl;

	system("pause");
	return 0;
}